#ifndef _AwardEquipDialog_h__
#define _AwardEquipDialog_h__

#include "Global.h"
#include "../EquipDetail.h"

class AwardEquipDialog
	: public ModelDialog
	, public CCBMemberVariableAssigner
	, public CCBSelectorResolver
	, public CCNodeLoaderListener
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(AwardEquipDialog, create);

	AwardEquipDialog(void);
	~AwardEquipDialog(void);

	virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode);
	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader);

	bool init();
	void refresh();
	void onEnter();
	void onExit();
private:
	CCLabelTTF* mName;
	CCLabelTTF* mDesc;
	EquipDetail* mEquipDetail;
	void _onNotification(CCObject* object);
	void onDoItClick(CCObject* pSender);
	void onSellBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	void onMeltBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	void onCloseBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	
};

#endif